from django.urls import path
from rest_framework.routers import DefaultRouter
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView, TokenVerifyView
from keep.views import ResourceViewSet, StaffModelView, RoleModelView, Resource_expModelView, Person_infoView,\
    Role_permissionView, WorkFlowView, WorkflowApprovalNodeModelViewSet, PositionModelViewSet, DepartmentModelViewSet,\
    TaskModelViewSet, Approval_RecordView

router = DefaultRouter()
router.register('resource', ResourceViewSet, 'resource')
router.register('staff', StaffModelView)
router.register("role", RoleModelView)
router.register("resource_exp", Resource_expModelView)
router.register("user", Person_infoView)
router.register("workflow_role", Role_permissionView)#角色权限
router.register("workflow", WorkFlowView)  # 新建工作流表
router.register("node", WorkflowApprovalNodeModelViewSet)  # 节点
router.register("pos", PositionModelViewSet)  # 职位
router.register("dep", DepartmentModelViewSet)  # 部门
router.register("task", TaskModelViewSet)  # 任务表
router.register("approval", Approval_RecordView)  # 审批记录表
# urlpatterns = []
urlpatterns = router.urls
